<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>发货明细</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../style/index.css">
    <style>
        .el-input.is-disabled .el-input__inner {
            color: #000;
            background-color: #fff;
            
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <yl-page-header content="与供应商对账"></yl-page-header>
        <el-form ref="contract" :rules="rules" inline-message="true" :model="form" style="width: 100%">
            <div class="table_titel">
                <div class="titel">筛选条件</div>
            </div>
            <el-descriptions :column="3" border size="small">
                <el-descriptions-item label="供应商">
                    <el-form-item prop="Supplier_SerialNumber">
                        <el-select v-model.trim="form.Supplier_SerialNumber" clearable style="width: 100%;"
                            placeholder="请选择供应商"  multiple collapse-tags filterable>
                            <el-option v-for="item in Supplier" :key="item.Supplier_SerialNumber"
                                :label="item.Supplier_Name" :value="item.Supplier_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="订单编号/订单明细编号">
                    <el-form-item prop="Sales_Order_SerialNumber">
                        <el-input v-model.trim="form.Sales_Order_SerialNumber" clearable placeholder="订单编号/订单明细编号" />
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="时间范围">
                    <el-form-item>
                        <el-date-picker prefix-icon="el-icon-date" v-model="form.Sales_Date" clearable type="datetimerange"
                            value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
                            end-placeholder="结束日期"></el-date-picker>
                    </el-form-item>
                </el-descriptions-item>
            </el-descriptions>
            <div class="table_titel">
                <div class="titel">对账明细</div>
                <div class="operation">
                    <el-button type="primary" @click="onSerach('contract')">查询</el-button>
                </div>
            </div>
            <el-table :data="tableData.slice((form.page-1)*form.limit,form.page*form.limit)" stripe border height="calc(100vh - 300px)" style="width: 100%">
                <el-table-column align="center" type="index" label="序号" width="50"></el-table-column>
                <el-table-column align="center" prop="Sales_Order_Detail_SerialNumber" width="300" show-overflow-tooltip label="订单明细编号"></el-table-column>
                <el-table-column align="center" prop="Sales_Order_SerialNumber" width="300" show-overflow-tooltip label="订单编号"></el-table-column>
                <el-table-column align="center" prop="Supplier_Name" width="150" show-overflow-tooltip label="供应商"></el-table-column>
                <el-table-column align="center" prop="Article_Name" width="150" show-overflow-tooltip label="商品名称"></el-table-column>
                <el-table-column align="center" prop="Specifications_Name" width="150" show-overflow-tooltip label="规格名称"></el-table-column>
                <el-table-column align="center" prop="Sales_Date" width="180" label="下单时间"></el-table-column>
                <el-table-column align="center" prop="Collection_Date" width="180" label="付款时间">
                    <template v-slot="{row}">
                        <span>{{getYMDHMSDate(row.Collection_Date)}}</span>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="Sales_Unit_Price" width="100" label="销售单价"></el-table-column>
                <el-table-column align="center" prop="Purchase_Unit_Price" width="100" label="采购单价"></el-table-column>
                <el-table-column align="center" prop="Delivery_Quantity" width="100" label="发货数量"></el-table-column>
                <el-table-column align="center" width="100" label="采购总价">
                    <template  v-slot="{row}">
                        <span>{{accMul(row.Delivery_Quantity, row.Purchase_Unit_Price)}}</span>
                    </template>
                </el-table-column>
                <el-table-column align="center" prop="Row_Status" label="发货状态">
                    <template v-slot="{row}">
                        <el-tag :type="row.Row_Status=='0'?'':row.Row_Status=='1'?'warning':'success'">{{Type(row.Row_Status)}}</el-tag>
                    </template>
                </el-table-column>
                <el-table-column align="center" fixed="right" prop="Row_Status" label="操作">
                    <template v-slot="{row,$index}">
                        <el-button size="small" :disabled="loading" type="danger" @click="handleRemove($index)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination style="margin-top: 5px;" background @size-change="handleSizeChange"
                @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[20, 30, 50 ,100 ,300 ,500]"
                :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="tableData.length">
            </el-pagination>
            <el-form-item class="form-operation">
                <el-button @click="window.history.back()">返回</el-button>
                <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
            </el-form-item>
        </el-form>

    </div>
    <script type="text/javascript" src="../../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../utils/vuex.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../component/component.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.core.min.js"></script>
    <script type="text/javascript" src="../../../config/config.js"></script>
    <script type="text/javascript" src="../../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/add.js"></script>
</body>

</html>